<?php

class WorkerCaselistController extends Controller
{
    /*
    * 获取列表分页
    *
    */
    public function actionGetListPaging()
    {

        try {
            //参数验证

            //检测
            //$user_id = SessionService::getUserIDBySessionid();


            $searchsql = Util::initSearchSql();


            //获取count
            $totalcount = WorkerCaselist::model()->count($searchsql);



            //排序
            $searchsql = $searchsql . " order by publish_time desc";

            //加上分页控制
            $searchsql = Util::addLimitSql($searchsql);

            //获取list
            $list = WorkerCaselist::model()->findAll($searchsql);


            Util::responseList($totalcount, $list);

        } catch (Exception $e) {
            Util::responseErrorMsg($e->getMessage());

        }


    }


}